Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
removeUnknownsAndDefaultsdeletedpathLengthfrom<circle>,<ellipse>,<line>,<polygon>,<polyline>and<rect>, so the attribute survived only on<path>.pathLengthis valid on all of the basic shapes, not just<path>— MDN listscircle,ellipse,line,path,polygon,polylineandrect. Dropping it changes rendering for stroke-dash based animations, which is what #2310 reports: an animated<circle pathLength="36">loses the calibration and the spinner animation no longer matches itsstroke-dasharray/stroke-dashoffsetkeyframes.The allow-list in
plugins/_collections.jssimply did not list the attribute for the other shape elements.Changes
pathLengthto theattrsset ofcircle,ellipse,line,polygon,polylineandrectinplugins/_collections.js, matching the existingpathentry.test/plugins/removeUnknownsAndDefaults.18.svg.txtcovering every shape element (plus a<path>control and an unknown attribute, which is still removed).Validation
pnpm test— 525 passed, 3 skipped (includes the new fixture; the plugin harness also checks idempotence over two passes)pnpm lint— clean (ESLint + Prettier)pnpm typecheck— cleanBefore the change,
<circle r="7" pathLength="36">is emitted withoutpathLengthunder bothremoveUnknownsAndDefaultsandpreset-default; after the change it is preserved on all seven shape elements.Closes #2310